package top.hisoft.pattern.creational.prototype.key;

/**
 * 抽象钥匙类.
 *
 * @author sky
 * @since 2025-06-02
 */
public abstract class AbstractKey implements Cloneable {

    /**
     * 钥匙长度
     */
    private float length;

    /**
     * 钥匙厚度
     */
    private float thick;

    /**
     * 钥匙颜色
     */
    private String color;

    public float getLength() {
        return length;
    }

    public void setLength(float length) {
        this.length = length;
    }

    public float getThick() {
        return thick;
    }

    public void setThick(float thick) {
        this.thick = thick;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    @Override
    protected Object clone() {
        Object obj = null;
        try {
            obj = super.clone();
        } catch (CloneNotSupportedException e) {
            throw new RuntimeException(e);
        }
        return obj;
    }
}
